Skip to content

[CDF-27471, CDF-27573] 🪠 Clean v2#2796

Merged
doctrino merged 12 commits intomainfrom
deploy-drop
Mar 30, 2026
Merged

[CDF-27471, CDF-27573] 🪠 Clean v2#2796
doctrino merged 12 commits intomainfrom
deploy-drop

Conversation

@doctrino
Copy link
Copy Markdown
Contributor

@doctrino doctrino commented Mar 27, 2026

Description

Reusing the deploy v2 command for clean v2.

image

Bump

  • Patch
  • Skip

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
39455 33385 85% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/commands/deploy_v2/command.py 56% 🟢
TOTAL 56% 🟢

updated for commit: 9d83026 by action🐍

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 44.06780% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.61%. Comparing base (1ac2b48) to head (9d83026).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nite_toolkit/_cdf_tk/commands/deploy_v2/command.py 44.06% 33 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2796      +/-   ##
==========================================
- Coverage   84.65%   84.61%   -0.05%     
==========================================
  Files         447      447              
  Lines       39428    39455      +27     
==========================================
+ Hits        33378    33385       +7     
- Misses       6050     6070      +20     
Files with missing lines Coverage Δ
...nite_toolkit/_cdf_tk/commands/deploy_v2/command.py 55.55% <44.06%> (-1.78%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@doctrino doctrino marked this pull request as ready for review March 27, 2026 08:37
@doctrino doctrino requested review from a team as code owners March 27, 2026 08:37
@doctrino
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the clean command (v2) to the toolkit, allowing users to delete resources based on build configurations by extending the existing deployment logic. Feedback was provided regarding the suppression of skipped resource information during the result merging process, which may obscure important details like data-loss prevention warnings from the final summary.

for result in results:
if other_result := other_by_name.get(result.resource_name):
# We do not include skipped from the clean results.
other_result.skipped.clear()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Clearing skipped items from the clean phase can hide important information from the user. For example, when using deploy --drop without --drop-data, data resources are not dropped but are instead skipped with a HAS-DATA reason. The current implementation clears this skipped information, and the final report only shows the resource as 'updated' or 'unchanged', which can be misleading as the user might incorrectly assume that the resource was dropped and recreated.

To provide more transparency, consider removing this line. This will ensure that skipped items from the clean phase are included in the final summary, giving the user a complete picture of the operation.

@doctrino doctrino enabled auto-merge (squash) March 27, 2026 11:41
@doctrino doctrino merged commit 6077f29 into main Mar 30, 2026
14 checks passed
@doctrino doctrino deleted the deploy-drop branch March 30, 2026 06:23
doctrino added a commit that referenced this pull request Mar 30, 2026
# Description

Note this is stacked on two branches #2796 , and the branch #2792 ->
#2797 .

Adds a unit test that builds and deploy the complete orgs.

Found a few bugs through the testing:

1. CDF Project not set in `lineage.yaml` when running `cdf build`.
2. Unwrapping build variables were not done correctly for iteration
cases.
3. Lineage serialized as relative paths, but requires absolute paths
causing failure when loading.
4. Graphql was found in an incorrect way. 


## Bump

- [ ] Patch
- [x] Skip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants